package gui;

import java.io.File;
import javax.swing.filechooser.FileFilter;

/**
 *
 * @author Mariano Zapata
 */
public class FiltroZip extends FileFilter {

    private static final String DESCRIPCION= "Archivo comprimido (*.zip)";
    private static final String EXTENSION= ".zip";
    
    public FiltroZip() {super();}
    
    @Override
    public boolean accept(File f) {
        if (f.isDirectory())
            return true;
        return f.getName().toLowerCase().endsWith(EXTENSION);
    }

    @Override
    public String getDescription() {
        return DESCRIPCION;
    }
    
    @Override
    public String toString() {
        return EXTENSION;
    }
}
